added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2010 / VBAzureBingMaps / WebRole1 / SilverlightClient.aspx.vb
blobd6e18c8d7acdf3623c32c4012c6fdbd187613489
1 '***************************** Module Header ******************************\
2 '* Module Name: SilverlightClient.aspx.vb
3 '* Project: AzureBingMaps
4 '* Copyright (c) Microsoft Corporation.
5 '*
6 '* The code behind for the aspx page hosting the Silverlight client.
7 '*
8 '* This source is subject to the Microsoft Public License.
9 '* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
10 '* All other rights reserved.
11 '*
12 '* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
13 '* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
14 '* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
15 '\**************************************************************************
18 Partial Public Class SilverlightClient
19 Inherits System.Web.UI.Page
20 ' Those properties will be passed to Silverlight as initial parameters.
21 Public Property IsAuthenticated As Boolean
22 Public Property WelcomeMessage As String
24 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
25 ' Query session data to see if the user has been authenticated.
26 If Session("User") IsNot Nothing Then
27 Me.IsAuthenticated = True
28 Me.WelcomeMessage = "Welcome: " & DirectCast(Session("User"), String) & "."
29 Else
30 Me.IsAuthenticated = False
31 Me.WelcomeMessage = Nothing
32 End If
33 End Sub
34 End Class